package com.example.sellersale.controller;

import com.example.sellersale.entity.GoodsType;
import com.example.sellersale.server.GoodsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class GoodsTypeController {
    @Autowired
    private GoodsTypeService goodsTypeService;
    @GetMapping("/goodsTypes")
    public List<GoodsType> goodsTypes(){
        List<GoodsType> list = goodsTypeService.goodsTypes();
        return list;
    }
}
